home *** CD-ROM | disk | FTP | other *** search
- #ifndef _Blitters_h_
- #define _Blitters_h_
-
- /*
-
- resolution + color switching is handled OS specific routines in the mode manager
- after the game starts and it is connected to the server and just after it ends and is
- disconnected from the server
-
- also the fade in intro should be handled by OS specific routines, no point int trying
- to have an empty function do it
-
-
- When you pass stuff to draw it asumes it is a 640x480 screen, even if it isnt.
- It does this by having coordinates added at the last minute when it is drawn
-
- ALL GRAPHICS IN THE GAME ARE IN 256 COLORS
-
- */
-
-
-
- #include "GameTypes.h"
- #include "ColorConstants.h"
- #include <QDOffscreen.h>
-
-
- typedef struct
- {
- rect Bounds;
- PixMapHandle PixMap;
- GWorldPtr GWorld;
-
- } myMacOSOffScreen;
-
- // make it so I can use it as a generic thing
- typedef WindowPtr WindowPtr;
- typedef myMacOSOffScreen OffScreen;
-
-
- // buffer data types
- // this is VERY os specific
- class OffScreenBuff
- {
- public:
- OffScreenBuff( void );
- ~OffScreenBuff( void );
-
- Boolean LoadPicBuff( ushort picID );
- Boolean NewBuff( const rect &size );
- Boolean NewBuff( ushort width , ushort height );
-
- ushort *GetSrcPtr( void ); // returns the base pointer to the off screen
- ulong GetRowSize( void ); // Get the size of the row in the buffer
- rect GetBoundsSize( void ); // find out how big it is
-
- OffScreen *GetOffScreen( void );
-
- void DeleteBuff( void );
- private:
-
-
-
- OffScreen theOffScreen;
- Boolean declared;
-
- };
-
- // drawing options for DrawGeneric
-
- #define kDrawTransparent 0x0001 // if this bit true dont draw the transparent color
- #define kDrawTranslucent 0x0002 // blend together the two colors, with the insensity specified by more
- #define kDrawColorize 0x0004 // it replaces all but the clear color with the color specified
- #define kDrawCrop1 0x0008 // draw it croped
- #define kDrawCrop2 0x0010 // draw it croped , 2nd way
- #define kDrawInverse 0x0020 // draws it with the inverse color
- #define kDrawTint 0x0040 // draw it tinted with the color specified at mag
- // other utilities
- void PaintRect( OffScreenBuff *srcBuff, const rect *src , ushort color );
- // drawing routines
- int DrawGeneric( OffScreenBuff *srcBuff, const rect *src ,
- OffScreenBuff *destBuff , const rect *dest , const rect *destClip ,
- ushort options , uchar more , ushort color );
-
- void DrawPicture( OffScreenBuff *srcBuff, const rect *src ,
- OffScreenBuff *destBuff , const rect *dest ); // strait copy
- void DrawPictureInverse( OffScreenBuff *srcBuff, const rect *src ,
- OffScreenBuff *destBuff , const rect *dest );
- void DrawTranslu( OffScreenBuff *srcBuff, const rect *src ,
- OffScreenBuff *destBuff , const rect *dest , uchar mag);
- void DrawPictureTint( OffScreenBuff *srcBuff, const rect *src ,
- OffScreenBuff *destBuff , const rect *dest ,
- uchar mag , ushort color );
- void DrawClearPic( OffScreenBuff *srcBuff, const rect *src ,
- OffScreenBuff *destBuff , const rect *dest ); // copies everthing but clear color
- void DrawClearPicColor( OffScreenBuff *srcBuff, const rect *src ,
- OffScreenBuff *destBuff , const rect *dest ,
- ushort color );
-
- void DrawClearTranslu( OffScreenBuff *srcBuff, const rect *src ,
- OffScreenBuff *destBuff , const rect *dest , uchar mag);
-
- void DrawClearPicTint( OffScreenBuff *srcBuff, const rect *src ,
- OffScreenBuff *destBuff , const rect *dest ,
- uchar mag , ushort color );
-
- void DrawGenericCliped1( OffScreenBuff *srcBuff, const rect *src ,
- OffScreenBuff *destBuff , const rect *dest , const rect *destClip ,
- ushort options , uchar more , ushort color );
-
- void DrawClipedPicture2( OffScreenBuff *srcBuff, const rect *src ,
- OffScreenBuff *destBuff , const rect *dest , const rect *destClip); // copies everthing but clear color
-
- void DrawFastPicture640x( OffScreenBuff *srcBuff, const rect *src ,
- OffScreenBuff *destBuff , const rect *dest );
- #endif